<template>
	<div class="zBox">
		<el-table class="qjTable"  v-loading="loading" :data="tableList" stripe height="720" >
			<el-table-column prop="userName" label="成员" align="center"></el-table-column>
			<el-table-column prop="sabbaticalNum" label="剩余调休(小时)" align="center"></el-table-column>
			<el-table-column prop="todayNum" label="今日加班(小时)" align="center"></el-table-column>
			<el-table-column prop="weekNum" label="本周加班(小时)" align="center"></el-table-column>
			<el-table-column prop="monthNum" label="本月加班(小时)" align="center">
				<template #default="scope">
					{{ scope.row.monthNum == '0' ? 0 : scope.row.monthNum }}
				</template>
			</el-table-column>
			<el-table-column prop="quarterNum" label="季度加班(小时)" align="center">
				<template #default="scope">
					{{ scope.row.quarterNum == '0' ? 0 : scope.row.quarterNum }}
				</template>
			</el-table-column>
			<el-table-column prop="yearNum" label="全年加班(小时)" align="center"></el-table-column>
		</el-table>
		<pagination  v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
		<!-- 加班申请弹框 -->
	</div>
</template>

<script  setup>
import { getTjData } from '@/api/hkd';
import useUserStore from '@/store/modules/user';
const loading = ref(true);
const tableList = ref([]);
const total = ref(0);
const data = reactive({
	queryParams: {
		pageNum: 1,
		pageSize: 10,
	}
});

const { queryParams } = toRefs(data);
onMounted(() => {});

function getList() {
	loading.value = true;
	getTjData(queryParams.value).then(response => {
		tableList.value = response.rows;
		total.value = response.total;
		loading.value = false;
	});
}
getList()

</script>

<style lang="scss" scoped>
.qjButtonBox {
	padding: 20px 30px;
}
.qjBut {
	background: #be1a21;
	color: #ffffff;
	width: 100px;
	text-align: center;
	border-radius: 4px;
	padding: 10px 0;
	font-size: 0.875rem;
	cursor: pointer;
}
.dialog-footer button:first-child {
	margin-right: 10px;
}
:deep(.el-form) {
	display: flex;
	.left {
		// height: 100px;
		border-right: 2px dashed #e5e1e1;
	}
}
.userOption {
	display: flex;
	align-items: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;

	img {
		width: 100%;
		height: 100%;
		border-radius: 50%;
	}

	span {
		padding: 0 1rem;
	}
}
.sxm {
	margin-top: 20px;
}
.spBox,
.spBox2 {
	display: flex;
	flex-flow: column;

	p {
		margin-top: 0;
	}
	img {
		width: 45px;
		height: 45px;
		border-radius: 50%;
	}
}
.spBox2 {
	margin-right: 20px;
}
:deep(.left) {
	width: 50%;
	.el-form-item {
		display: flex;
		flex-flow: column;
	}
}
:deep(.right ){
	margin-left: 50px;
	width: 42%;
	.el-form-item {
		display: flex;
		flex-flow: column;
	}
	.spr,
	.csr {
		margin-bottom: 10px;
		.el-form-item__label {
			width: 70px !important;
		}
	}
}
.csrBox {
	margin-top: 20px;
	display: flex;
	max-height: 235px;
	overflow: auto;
	display: flex;
	flex-flow: wrap;
}
.csrBox::-webkit-scrollbar {
	display: none; /* Chrome Safari */
}
:deep(.qjTable)  {
	.el-table__header-wrapper,
	.el-table__fixed-header-wrapper {
		th {
			word-break: break-word;
			background-color: #f7f7f7 !important;
			color: #515a6e;
			height: 58px !important;
			font-size: 13px;
			border: none !important;
		}
	}
	.el-table__body-wrapper {
		.el-button [class*='el-icon-'] + span {
			margin-left: 1px;
		}
		.el-table__row {
			td {
				border: none !important;
				height: 55px;
				cursor: pointer;
			}
		}
	}
}
.ztbox {
	display: flex;
	align-items: center;
	justify-content: center;
	.dian {
		margin-right: 8px;
		width: 7px;
		height: 7px;
		border-radius: 50%;
	}
}
.czan {
	display: flex;
	justify-content: center;
}
#printDivdyAll {
	margin-top: -23px;
	width: 1000px;
	height: 400px;
	padding: 5px;

	td {
		text-align: center;
		font-size: 18px;
	}

	.zhai {
		height: 60px;
	}

	.shense {
		font-size: 20px;
	}

	table {
		width: 100%;
		height: 100%;
	}
}
.zBox{
	height: 99.8%;
	background-color: #ffffff;
	border-radius: 10px;
	padding: 20px;
}
:deep(.shbj) {
	background: url(../../assets/images/spbj.png) no-repeat;
	color: #be1a21;
	width: 140px;
	background-size: 100% 100%;
	padding: 5px 15px;
	font-size: 14px;
	margin-bottom: 10px;
	font-weight: 600;
}
.sptop {
	margin-top: 20px;
}
:deep(.bz) {
	.el-form-item__label {
		width: 50px !important;
	}
}
.red {
	color: #ff0000;
}
.spzt {
	width: 20px;
	height: 20px;
	display: inline-block;
	background-size: contain;
	margin-right: 10px;
}
.jdbox {
	position: relative;
}
.jdbox:last-child .xuLine {
	display: none;
}
.xuLine {
	position: absolute;
	width: 1px;
	height: 17px;
	border-left: 2px dashed rgb(204, 204, 204);
	left: 9px;
	top: 20px;
}
</style>
